import * as api from './api';

export default api;

import axios from 'axios';
import qs from 'qs';

 

 let base="/api";//本地代理

export const get_user_count = params => { return axios.post(`${base}/iot/device/get_user_count`, qs.stringify(params)).then(res => res.data); };//查询设备统计个数  
// export const get_countDeviceType = params => { return axios.get(`${base}/auth/company/get_count`, qs.stringify(params)).then(res => res.data); };//获取设备在线离线
export const get_countDeviceType = params => { return axios.post(`${base}/iot/device/my`, qs.stringify(params)).then(res => res.data); };//获取设备在线离线 
export const get_companyNum = params => { return axios.get(`${base}/auth/company/get_count`, qs.stringify(params)).then(res => res.data); };//获取经销商总数 
export const get_conversationCount = params => { return axios.post(`${base}/iot/conversation/getConversationCount`, qs.stringify(params)).then(res => res.data); };//获取工单统计 
export const get_countLevel = params => { return axios.post(`${base}/iot/alarm_log/countLevel`, qs.stringify(params)).then(res => res.data); };//获取报警数和报警总数 
export const get_data_sum = params => { return axios.post(`${base}/iot/alarm_log/data_sum`, qs.stringify(params)).then(res => res.data); };//报警数量走势图 
export const get_device_type = params => { return axios.post(`${base}/iot/device/count_device_type`, qs.stringify(params)).then(res => res.data); };//设备类型统计
export const get_device_sales = params => { return axios.post(`${base}/iot/device/count_sales_device`, qs.stringify(params)).then(res => res.data); };//设备销售统计
export const get_company_device = params => { return axios.post(`${base}/iot/device/count_company_device`, qs.stringify(params)).then(res => res.data); };//经销商设备数量
